//
// CComputedString.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CRGBA;
import org.ryzom.nel.misc.CVector;

public class CComputedString {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CComputedString(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CComputedString obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CComputedString(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public void setVertices(CVertexBuffer value) {
    nel3dJNI.CComputedString_Vertices_set(swigCPtr, this, CVertexBuffer.getCPtr(value), value);
  }

  public CVertexBuffer getVertices() {
    return new CVertexBuffer(nel3dJNI.CComputedString_Vertices_get(swigCPtr, this), true);
  }

  public void setMaterial(CMaterial value) {
    nel3dJNI.CComputedString_Material_set(swigCPtr, this, CMaterial.getCPtr(value), value);
  }

  public CMaterial getMaterial() {
    long cPtr = nel3dJNI.CComputedString_Material_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CMaterial(cPtr, false);
  }

  public void setColor(CRGBA value) {
    nel3dJNI.CComputedString_Color_set(swigCPtr, this, CRGBA.getCPtr(value), value);
  }

  public CRGBA getColor() {
    return new CRGBA(nel3dJNI.CComputedString_Color_get(swigCPtr, this), true);
  }

  public void setStringWidth(float value) {
    nel3dJNI.CComputedString_StringWidth_set(swigCPtr, this, value);
  }

  public float getStringWidth() {
    return nel3dJNI.CComputedString_StringWidth_get(swigCPtr, this);
  }

  public void setStringHeight(float value) {
    nel3dJNI.CComputedString_StringHeight_set(swigCPtr, this, value);
  }

  public float getStringHeight() {
    return nel3dJNI.CComputedString_StringHeight_get(swigCPtr, this);
  }

  public void setXMin(float value) {
    nel3dJNI.CComputedString_XMin_set(swigCPtr, this, value);
  }

  public float getXMin() {
    return nel3dJNI.CComputedString_XMin_get(swigCPtr, this);
  }

  public void setZMin(float value) {
    nel3dJNI.CComputedString_ZMin_set(swigCPtr, this, value);
  }

  public float getZMin() {
    return nel3dJNI.CComputedString_ZMin_get(swigCPtr, this);
  }

  public void setXMax(float value) {
    nel3dJNI.CComputedString_XMax_set(swigCPtr, this, value);
  }

  public float getXMax() {
    return nel3dJNI.CComputedString_XMax_get(swigCPtr, this);
  }

  public void setZMax(float value) {
    nel3dJNI.CComputedString_ZMax_set(swigCPtr, this, value);
  }

  public float getZMax() {
    return nel3dJNI.CComputedString_ZMax_get(swigCPtr, this);
  }

  public void setStringLine(float value) {
    nel3dJNI.CComputedString_StringLine_set(swigCPtr, this, value);
  }

  public float getStringLine() {
    return nel3dJNI.CComputedString_StringLine_get(swigCPtr, this);
  }

  public void setSelectStart(long value) {
    nel3dJNI.CComputedString_SelectStart_set(swigCPtr, this, value);
  }

  public long getSelectStart() {
    return nel3dJNI.CComputedString_SelectStart_get(swigCPtr, this);
  }

  public void setSelectSize(long value) {
    nel3dJNI.CComputedString_SelectSize_set(swigCPtr, this, value);
  }

  public long getSelectSize() {
    return nel3dJNI.CComputedString_SelectSize_get(swigCPtr, this);
  }

  public void setLetterColors(CLetterColors value) {
    nel3dJNI.CComputedString_LetterColors_set(swigCPtr, this, CLetterColors.getCPtr(value), value);
  }

  public CLetterColors getLetterColors() {
    long cPtr = nel3dJNI.CComputedString_LetterColors_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CLetterColors(cPtr, false);
  }

  public CComputedString(boolean bSetupVB) {
    this(nel3dJNI.new_CComputedString__SWIG_0(bSetupVB), true);
  }

  public CComputedString() {
    this(nel3dJNI.new_CComputedString__SWIG_1(), true);
  }

  public CVector getHotSpotVector(CComputedString.THotSpot hotspot) {
    return new CVector(nel3dJNI.CComputedString_getHotSpotVector(swigCPtr, this, hotspot.swigValue()), true);
  }

  public void render2D(IDriver driver, float x, float z, CComputedString.THotSpot hotspot, float scaleX, float scaleZ, float rotateY, boolean useScreenAR43, boolean roundToNearestPixel) {
    nel3dJNI.CComputedString_render2D__SWIG_0(swigCPtr, this, IDriver.getCPtr(driver), driver, x, z, hotspot.swigValue(), scaleX, scaleZ, rotateY, useScreenAR43, roundToNearestPixel);
  }

  public void render2D(IDriver driver, float x, float z, CComputedString.THotSpot hotspot, float scaleX, float scaleZ, float rotateY, boolean useScreenAR43) {
    nel3dJNI.CComputedString_render2D__SWIG_1(swigCPtr, this, IDriver.getCPtr(driver), driver, x, z, hotspot.swigValue(), scaleX, scaleZ, rotateY, useScreenAR43);
  }

  public void render2D(IDriver driver, float x, float z, CComputedString.THotSpot hotspot, float scaleX, float scaleZ, float rotateY) {
    nel3dJNI.CComputedString_render2D__SWIG_2(swigCPtr, this, IDriver.getCPtr(driver), driver, x, z, hotspot.swigValue(), scaleX, scaleZ, rotateY);
  }

  public void render2D(IDriver driver, float x, float z, CComputedString.THotSpot hotspot, float scaleX, float scaleZ) {
    nel3dJNI.CComputedString_render2D__SWIG_3(swigCPtr, this, IDriver.getCPtr(driver), driver, x, z, hotspot.swigValue(), scaleX, scaleZ);
  }

  public void render2D(IDriver driver, float x, float z, CComputedString.THotSpot hotspot, float scaleX) {
    nel3dJNI.CComputedString_render2D__SWIG_4(swigCPtr, this, IDriver.getCPtr(driver), driver, x, z, hotspot.swigValue(), scaleX);
  }

  public void render2D(IDriver driver, float x, float z, CComputedString.THotSpot hotspot) {
    nel3dJNI.CComputedString_render2D__SWIG_5(swigCPtr, this, IDriver.getCPtr(driver), driver, x, z, hotspot.swigValue());
  }

  public void render2D(IDriver driver, float x, float z) {
    nel3dJNI.CComputedString_render2D__SWIG_6(swigCPtr, this, IDriver.getCPtr(driver), driver, x, z);
  }

  public void render2DClip(IDriver driver, CRenderStringBuffer rdrBuffer, float x, float z, float xmin, float ymin, float xmax, float ymax) {
    nel3dJNI.CComputedString_render2DClip__SWIG_0(swigCPtr, this, IDriver.getCPtr(driver), driver, CRenderStringBuffer.getCPtr(rdrBuffer), rdrBuffer, x, z, xmin, ymin, xmax, ymax);
  }

  public void render2DClip(IDriver driver, CRenderStringBuffer rdrBuffer, float x, float z, float xmin, float ymin, float xmax) {
    nel3dJNI.CComputedString_render2DClip__SWIG_1(swigCPtr, this, IDriver.getCPtr(driver), driver, CRenderStringBuffer.getCPtr(rdrBuffer), rdrBuffer, x, z, xmin, ymin, xmax);
  }

  public void render2DClip(IDriver driver, CRenderStringBuffer rdrBuffer, float x, float z, float xmin, float ymin) {
    nel3dJNI.CComputedString_render2DClip__SWIG_2(swigCPtr, this, IDriver.getCPtr(driver), driver, CRenderStringBuffer.getCPtr(rdrBuffer), rdrBuffer, x, z, xmin, ymin);
  }

  public void render2DClip(IDriver driver, CRenderStringBuffer rdrBuffer, float x, float z, float xmin) {
    nel3dJNI.CComputedString_render2DClip__SWIG_3(swigCPtr, this, IDriver.getCPtr(driver), driver, CRenderStringBuffer.getCPtr(rdrBuffer), rdrBuffer, x, z, xmin);
  }

  public void render2DClip(IDriver driver, CRenderStringBuffer rdrBuffer, float x, float z) {
    nel3dJNI.CComputedString_render2DClip__SWIG_4(swigCPtr, this, IDriver.getCPtr(driver), driver, CRenderStringBuffer.getCPtr(rdrBuffer), rdrBuffer, x, z);
  }

  public void render2DUnProjected(IDriver driver, CRenderStringBuffer rdrBuffer, CFrustum frustum, SWIGTYPE_p_NLMISC__CMatrix scaleMatrix, float x, float z, float depth, float xmin, float ymin, float xmax, float ymax) {
    nel3dJNI.CComputedString_render2DUnProjected__SWIG_0(swigCPtr, this, IDriver.getCPtr(driver), driver, CRenderStringBuffer.getCPtr(rdrBuffer), rdrBuffer, CFrustum.getCPtr(frustum), frustum, SWIGTYPE_p_NLMISC__CMatrix.getCPtr(scaleMatrix), x, z, depth, xmin, ymin, xmax, ymax);
  }

  public void render2DUnProjected(IDriver driver, CRenderStringBuffer rdrBuffer, CFrustum frustum, SWIGTYPE_p_NLMISC__CMatrix scaleMatrix, float x, float z, float depth, float xmin, float ymin, float xmax) {
    nel3dJNI.CComputedString_render2DUnProjected__SWIG_1(swigCPtr, this, IDriver.getCPtr(driver), driver, CRenderStringBuffer.getCPtr(rdrBuffer), rdrBuffer, CFrustum.getCPtr(frustum), frustum, SWIGTYPE_p_NLMISC__CMatrix.getCPtr(scaleMatrix), x, z, depth, xmin, ymin, xmax);
  }

  public void render2DUnProjected(IDriver driver, CRenderStringBuffer rdrBuffer, CFrustum frustum, SWIGTYPE_p_NLMISC__CMatrix scaleMatrix, float x, float z, float depth, float xmin, float ymin) {
    nel3dJNI.CComputedString_render2DUnProjected__SWIG_2(swigCPtr, this, IDriver.getCPtr(driver), driver, CRenderStringBuffer.getCPtr(rdrBuffer), rdrBuffer, CFrustum.getCPtr(frustum), frustum, SWIGTYPE_p_NLMISC__CMatrix.getCPtr(scaleMatrix), x, z, depth, xmin, ymin);
  }

  public void render2DUnProjected(IDriver driver, CRenderStringBuffer rdrBuffer, CFrustum frustum, SWIGTYPE_p_NLMISC__CMatrix scaleMatrix, float x, float z, float depth, float xmin) {
    nel3dJNI.CComputedString_render2DUnProjected__SWIG_3(swigCPtr, this, IDriver.getCPtr(driver), driver, CRenderStringBuffer.getCPtr(rdrBuffer), rdrBuffer, CFrustum.getCPtr(frustum), frustum, SWIGTYPE_p_NLMISC__CMatrix.getCPtr(scaleMatrix), x, z, depth, xmin);
  }

  public void render2DUnProjected(IDriver driver, CRenderStringBuffer rdrBuffer, CFrustum frustum, SWIGTYPE_p_NLMISC__CMatrix scaleMatrix, float x, float z, float depth) {
    nel3dJNI.CComputedString_render2DUnProjected__SWIG_4(swigCPtr, this, IDriver.getCPtr(driver), driver, CRenderStringBuffer.getCPtr(rdrBuffer), rdrBuffer, CFrustum.getCPtr(frustum), frustum, SWIGTYPE_p_NLMISC__CMatrix.getCPtr(scaleMatrix), x, z, depth);
  }

  public void render3D(IDriver driver, SWIGTYPE_p_NLMISC__CMatrix matrix, CComputedString.THotSpot hotspot) {
    nel3dJNI.CComputedString_render3D__SWIG_0(swigCPtr, this, IDriver.getCPtr(driver), driver, SWIGTYPE_p_NLMISC__CMatrix.getCPtr(matrix), hotspot.swigValue());
  }

  public void render3D(IDriver driver, SWIGTYPE_p_NLMISC__CMatrix matrix) {
    nel3dJNI.CComputedString_render3D__SWIG_1(swigCPtr, this, IDriver.getCPtr(driver), driver, SWIGTYPE_p_NLMISC__CMatrix.getCPtr(matrix));
  }

  public final static class THotSpot {
    public final static THotSpot BottomLeft = new THotSpot("BottomLeft", nel3dJNI.CComputedString_BottomLeft_get());
    public final static THotSpot MiddleLeft = new THotSpot("MiddleLeft");
    public final static THotSpot TopLeft = new THotSpot("TopLeft");
    public final static THotSpot MiddleBottom = new THotSpot("MiddleBottom");
    public final static THotSpot MiddleMiddle = new THotSpot("MiddleMiddle");
    public final static THotSpot MiddleTop = new THotSpot("MiddleTop");
    public final static THotSpot BottomRight = new THotSpot("BottomRight");
    public final static THotSpot MiddleRight = new THotSpot("MiddleRight");
    public final static THotSpot TopRight = new THotSpot("TopRight");
    public final static THotSpot HotSpotCount = new THotSpot("HotSpotCount");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static THotSpot swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + THotSpot.class + " with value " + swigValue);
    }

    private THotSpot(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private THotSpot(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private THotSpot(String swigName, THotSpot swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static THotSpot[] swigValues = { BottomLeft, MiddleLeft, TopLeft, MiddleBottom, MiddleMiddle, MiddleTop, BottomRight, MiddleRight, TopRight, HotSpotCount };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

}
